//
//  shoudongbangdingViewController.m
//  左邻右家
//
//  Created by dsdf on 16/2/23.
//  Copyright © 2016年 Hiccup. All rights reserved.
//

#import "shoudongbangdingViewController.h"
#import "KxMenu.h"
@interface shoudongbangdingViewController ()

@end

@implementation shoudongbangdingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
//    self.navigationController.navigationBar.tintColor=[[UIColor alloc] initWithRed:230/255.0 green:55/255.0 blue:55/255.0 alpha:1.0];

//    self.title=@"盒子管理";
    self.navigationController.navigationBar.barTintColor = [[UIColor alloc] initWithRed:230/255.0 green:55/255.0 blue:55/255.0 alpha:1.0];
    self.title=@"盒子管理";
    
    UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, 20, 20);
    [button setBackgroundImage:[UIImage imageNamed:@"smart_0000_盒子管理-1.png"] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(messageBtnClick) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem * rightItem = [[UIBarButtonItem alloc] initWithCustomView:button];
    self.navigationItem.rightBarButtonItem = rightItem;
    
    


    
    
    
}
-(void)messageBtnClick
{
   NSArray *menuItems =@[ [KxMenuItem menuItem:@"扫描绑定"
                   image:nil
                  target:nil
                action:NULL],[KxMenuItem menuItem:@"手动绑定"
                                                image:nil
                                                target:nil
                                                action:NULL]];
    KxMenuItem *first = menuItems[0];
    first.foreColor = [UIColor whiteColor];
    first.alignment = NSTextAlignmentCenter;
    
    [KxMenu showMenuInView:self.view
                  fromRect:CGRectMake(self.view.bounds.size.width-50,17,50,50)
                 menuItems:menuItems];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
